package com.lunasoft.core;

import java.io.Serializable;

/**
 * @author Jierry
 * @version 2016/7/11.
 */
public abstract class BaseMsg implements Serializable {
    //必须实现序列,serialVersionUID 一定要有,否者在netty消息序列化反序列化会有问题，接收不到消息！！！
    private static final long serialVersionUID = 1L;

    private MsgType msgType;
    private String clientId;//必须唯一，否者会出现channel调用混乱

    public BaseMsg() {
        this.clientId = Constants.getClientId();
    }

    public MsgType getMsgType() {
        return msgType;
    }

    public void setMsgType(MsgType msgType) {
        this.msgType = msgType;
    }

    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }
}
